]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Revert "main: Make sure that --mode parameter is valid"
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 24 May 2012 17:33:25 +0000 (19:33 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 24 May 2012 17:34:06 +0000 (19:34 +0200)
This reverts commit a7a46bbe1cac8d3512679637cd75e53e9e98c121.

Conflicts:

js/ui/sessionMode.js

js/ui/sessionMode.js
src/main.c
src/shell-global-private.h
src/shell-global.c

index ab9c61b8c2ba04336955f9999284001e850e989f..a98782871bc6513e4016fe91b008b0b8aee62467 100644 (file)
@@ -75,11 +75,6 @@ const _modes = {
             }
 };
 
-function modeExists(mode) {
-    let modes = Object.getOwnPropertyNames(_modes);
-    return modes.indexOf(mode) != -1;
-}
-
 function listModes() {
     let modes = Object.getOwnPropertyNames(_modes);
     for (let i = 0; i < modes.length; i++)
index 1f200392d9674ebf97e46e2de8e5feedfd521bfa..98528906be34a32ba137594668d879fda5898b72 100644 (file)
@@ -393,12 +393,6 @@ main (int argc, char **argv)
 
   _shell_global_init ("session-mode", session_mode, NULL);
 
-  if (!_shell_global_has_valid_session_mode (shell_global_get ()))
-    {
-      g_printerr ("\"%s\" is not a valid mode.\n", session_mode);
-      exit(1);
-    }
-
   ecode = meta_run ();
 
   if (g_getenv ("GNOME_SHELL_ENABLE_CLEANUP"))
index 194312d65e46faa0a6d2e66a9f3414045ad41cac..786719f5bfa6354300ca1ca6dd4906db1997de68 100644 (file)
@@ -13,7 +13,6 @@ void _shell_global_set_plugin      (ShellGlobal  *global,
 
 GjsContext *_shell_global_get_gjs_context (ShellGlobal  *global);
 
-gboolean _shell_global_has_valid_session_mode (ShellGlobal *global);
 gboolean _shell_global_check_xdnd_event (ShellGlobal  *global,
                                          XEvent       *xev);
 
index ab3b59ea48fb303609cdbfc44117ad5f76bd5591..10fb0b35ee024e4901df58e3c046d0afd1a6ebac 100644 (file)
@@ -585,21 +585,6 @@ shell_global_set_stage_input_mode (ShellGlobal         *global,
     }
 }
 
-gboolean
-_shell_global_has_valid_session_mode (ShellGlobal *global)
-{
-  char *script;
-  int status;
-
-  script = g_strdup_printf ("imports.ui.environment.init();"
-                            "imports.ui.sessionMode.modeExists('%s') || 1;",
-                            global->session_mode);
-  gjs_context_eval (global->js_context, script, -1, "<sessionMode.js>", &status, NULL);
-  g_free (script);
-
-  return status == 0;
-}
-
 /**
  * shell_global_set_cursor:
  * @global: A #ShellGlobal